﻿<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0063)http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html -->
<HTML xmlns="http://www.w3.org/1999/xhtml"><HEAD><TITLE>Dancing Links的重复覆盖问题解法 - Lost - 博客园</TITLE>
<META http-equiv=Content-Type content="text/html; charset=utf-8">
<META content=ACM,ICPC,Dancing,Links的重复覆盖问题解法 name=keywords><LINK 
href="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/common.css" type=text/css 
rel=stylesheet><LINK id=MainCss 
href="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/style.css" type=text/css 
rel=stylesheet><LINK 
href="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/common2.css" type=text/css 
rel=stylesheet><LINK href="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/shCore.css" 
type=text/css rel=stylesheet><LINK 
href="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/shThemeDefault.css" 
type=text/css rel=stylesheet><LINK title=RSS 
href="http://www.cnblogs.com/zhuangli/rss" type=application/rss+xml 
rel=alternate><LINK title=RSD href="http://www.cnblogs.com/zhuangli/rsd.xml" 
type=application/rsd+xml rel=EditURI>
<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/jquery.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/common.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/jquery.json-1.3.min.js" 
type=text/javascript></SCRIPT>

<META content="MSHTML 6.00.2900.5897" name=GENERATOR></HEAD>
<BODY>
<FORM id=Form1 name=Form1 action=1537844.html method=post>
<DIV><INPUT id=__EVENTTARGET type=hidden name=__EVENTTARGET> <INPUT 
id=__EVENTARGUMENT type=hidden name=__EVENTARGUMENT> <INPUT 
id="&#13;&#10;__VIEWSTATE" type=hidden name=__VIEWSTATE> </DIV>
<SCRIPT type=text/javascript>
//<![CDATA[
var theForm = document.forms['Form1'];
if (!theForm) {
    theForm = document.Form1;
}
function __doPostBack(eventTarget, eventArgument) {
    if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
        theForm.__EVENTTARGET.value = eventTarget;
        theForm.__EVENTARGUMENT.value = eventArgument;
        theForm.submit();
    }
}
//]]>
</SCRIPT>
<!--done-->
<DIV id=home>
<DIV id=header>
<DIV id=blogTitle><A id=lnkBlogLogo href="http://www.cnblogs.com/zhuangli/"><IMG 
id=blogLogo alt=返回主页 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/logo.gif"></A> <!--done-->
<H1><A class=headermaintitle id=Header1_HeaderTitle 
href="http://www.cnblogs.com/zhuangli/">Lost</A></H1>
<H2>在大牛们无情的鄙视中成长...</H2></DIV><!--end: blogTitle 博客的标题和副标题 -->
<DIV id=navigator><!--done-->
<UL id=navList>
  <LI><A class=menu id=MyLinks1_HomeLink href="http://www.cnblogs.com/">博客园</A> 
  </LI>
  <LI><A class=menu id=MyLinks1_SpaceLink 
  href="http://space.cnblogs.com/">社区</A> </LI>
  <LI><A class=menu id=MyLinks1_MyHomeLink 
  href="http://www.cnblogs.com/zhuangli/">首页</A> </LI>
  <LI><A class=menu id=MyLinks1_NewPostLink 
  href="http://www.cnblogs.com/zhuangli/admin/EditPosts.aspx?opt=1">新随笔</A> 
</LI>
  <LI><A class=menu id=MyLinks1_ContactLink accessKey=9 
  href="http://space.cnblogs.com/msg/send/Hdu-Lost">联系</A> </LI>
  <LI><A class=menu id=MyLinks1_Admin 
  href="http://www.cnblogs.com/zhuangli/admin/EditPosts.aspx">管理</A> </LI>
  <LI><A class=menu id=MyLinks1_Syndication 
  href="http://www.cnblogs.com/zhuangli/rss">订阅</A> <A class=aHeaderXML 
  id=MyLinks1_XMLLink href="http://www.cnblogs.com/zhuangli/rss"><IMG 
  style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
  alt=订阅 src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/rss.gif"></A> </LI></UL>
<DIV class=blogStats><!--done-->随笔- 65&nbsp; 文章- 0&nbsp; 评论- 96&nbsp; </DIV><!--end: blogStats --></DIV><!--end: navigator 博客导航栏 --></DIV><!--end: header 头部 -->
<DIV id=main>
<DIV id=mainContent>
<DIV class=forFlow><!--done-->
<DIV id=topics>
<DIV class=post>
<H1 class=postTitle><A class=postTitle2 id=ctl04_TitleUrl 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html">Dancing 
Links的重复覆盖问题解法</A> </H1>
<DIV class=clear></DIV>
<DIV class=postBody>
<DIV align=left>&nbsp;&nbsp;&nbsp;&nbsp; 
众所周知，DLX对于解决精确覆盖问题有非常出奇的效果，但我们现在考虑一种叫做重复覆盖的问题。其实这一问题是我们看到DL的论文第一部分时，对Dancing 
Links用法的初次想法。它就是单纯利用了链表的性质进行的模拟（请允许我这么说），但抽象而言，就是对0/1矩阵进行如下操作：选取一些行，使所有的列都有‘1’（想想与精确覆盖的不同之处）。在实现上，不需要精确覆盖的排他性操作，而在框架上的实现则是相同的。考虑一个优化，在重复覆盖问题中，对于列长是不动态计数的，能否通过初始的排序减小常数。<BR>&nbsp;&nbsp;&nbsp;&nbsp; 
以下是一般的重复覆盖问题的实现，要用到Iter-A*，使用启发函数进行加速，启发函数的设计十分简单，相信大家能看懂，此处未加过优化，如果大家有想法可以自己实现。<BR><BR><BR>
<DIV class=cnblogs_code><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><SPAN 
style="COLOR: #000000">#include&nbsp;</SPAN><SPAN 
style="COLOR: #000000">&lt;</SPAN><SPAN 
style="COLOR: #000000">iostream</SPAN><SPAN 
style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>#include&nbsp;</SPAN><SPAN style="COLOR: #000000">&lt;</SPAN><SPAN 
style="COLOR: #000000">cmath</SPAN><SPAN style="COLOR: #000000">&gt;</SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">using</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">namespace</SPAN><SPAN 
style="COLOR: #000000">&nbsp;std;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">const</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;MAXR</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">60</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">const</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;MAXC</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">60</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">const</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;MAXLEN</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">MAXR</SPAN><SPAN 
style="COLOR: #000000">*</SPAN><SPAN style="COLOR: #000000">MAXC</SPAN><SPAN 
style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">MAXR</SPAN><SPAN 
style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #000000">MAXC;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;L[MAXLEN];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;R[MAXLEN];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;D[MAXLEN];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;U[MAXLEN];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;nRow[MAXLEN];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;nCol[MAXLEN];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Col[MAXC];&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">判定列集是否已插入</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;Row[MAXR];&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">判定行集是否已插入<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">int&nbsp;RC[MAXR][MAXC];&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">判定元素是否已插入</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;RS[MAXR],CS[MAXC];&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">行长与列长</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;eid;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">内存标识</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;head;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;Cn;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;MAXSTEP;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">int&nbsp;ans[MAXC];</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG id=Codehighlighter1_415_428_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_415_428_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_415_428_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_415_428_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_415_428_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_415_428_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_415_428_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_415_428_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_415_428_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</SPAN><SPAN 
id=Codehighlighter1_415_428_Open_Text><SPAN 
style="COLOR: #008000">/*</SPAN><SPAN 
style="COLOR: #008000">int&nbsp;alen;</SPAN><SPAN 
style="COLOR: #008000">*/</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">DLX算法&nbsp;进行重复覆盖</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #000000">inline&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;init()<BR><IMG 
id=Codehighlighter1_464_706_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_464_706_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_464_706_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_464_706_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_464_706_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_464_706_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_464_706_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_464_706_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_464_706_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_464_706_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;memset(Row,</SPAN><SPAN 
style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #0000ff">sizeof</SPAN><SPAN 
style="COLOR: #000000">(Row));<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;memset(Col,</SPAN><SPAN 
style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #0000ff">sizeof</SPAN><SPAN 
style="COLOR: #000000">(Col));<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;memset(RC,-1,sizeof(RC));</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;memset(nCol,</SPAN><SPAN 
style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #0000ff">sizeof</SPAN><SPAN 
style="COLOR: #000000">(nCol));<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;memset(nRow,</SPAN><SPAN 
style="COLOR: #000000">-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">,</SPAN><SPAN style="COLOR: #0000ff">sizeof</SPAN><SPAN 
style="COLOR: #000000">(nRow));<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;head</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;L[head]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">R[head]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">D[head]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">U[head]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">head;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;eid</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;Cn</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">插入行</SPAN><SPAN style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;insRow(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;r)<BR><IMG 
id=Codehighlighter1_741_887_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_741_887_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_741_887_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_741_887_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_741_887_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_741_887_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_741_887_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_741_887_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_741_887_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_741_887_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;U[D[head]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;U[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">head;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;D[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">D[head];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;D[head]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;L[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">R[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;RS[r]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;Row[r]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">插入列</SPAN><SPAN style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;insColumn(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;c)<BR><IMG 
id=Codehighlighter1_925_1066_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_925_1066_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_925_1066_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_925_1066_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_925_1066_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_925_1066_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_925_1066_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_925_1066_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_925_1066_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_925_1066_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;L[R[head]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;L[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">head;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;R[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">R[head];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;R[head]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;U[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">D[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;CS[c]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;Col[c]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">插入元素</SPAN><SPAN style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;insElement(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;r,</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;c)<BR><IMG 
id=Codehighlighter1_1112_1417_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1112_1417_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1112_1417_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1112_1417_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1112_1417_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1112_1417_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1112_1417_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1112_1417_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_1112_1417_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1112_1417_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;rid</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">Row[r];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;cid</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">Col[c];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;L[R[rid]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;L[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">rid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;R[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">R[rid];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;R[rid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;U[D[cid]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;U[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">cid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;D[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">D[cid];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;D[cid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;nRow[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">r;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;nCol[eid]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">c;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">CS[c];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">RS[r];<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;RC[r][c]=eid;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">eid;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">插入操作</SPAN><SPAN style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;insert(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;r,&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;c)<BR><IMG 
id=Codehighlighter1_1460_1649_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1460_1649_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1460_1649_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1460_1649_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1460_1649_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1460_1649_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1460_1649_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1460_1649_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_1460_1649_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1460_1649_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(Col[c]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_1487_1530_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1487_1530_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1487_1530_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1487_1530_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1487_1530_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1487_1530_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1487_1530_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1487_1530_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1487_1530_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1487_1530_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">Cn;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insColumn(c);<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(Row[r]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_1555_1581_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1555_1581_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1555_1581_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1555_1581_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1555_1581_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1555_1581_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1555_1581_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1555_1581_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1555_1581_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1555_1581_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insRow(r);<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;if(RC[r][c]==-1)<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;{</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;insElement(r,c);<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">删除列(使用cid)</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;RemoveCol(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;c)<BR><IMG 
id=Codehighlighter1_1694_1820_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1694_1820_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1694_1820_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1694_1820_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1694_1820_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1694_1820_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1694_1820_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1694_1820_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_1694_1820_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1694_1820_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">c=Col[c];</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">U[c];i</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">c;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">U[i])<BR><IMG id=Codehighlighter1_1758_1817_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1758_1817_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1758_1817_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1758_1817_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1758_1817_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1758_1817_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1758_1817_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1758_1817_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1758_1817_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1758_1817_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;L[R[i]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">L[i];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R[L[i]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">R[i];&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">恢复列(使用cid)</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">void</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ResumeCol(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;c)<BR><IMG 
id=Codehighlighter1_1865_1986_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1865_1986_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1865_1986_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1865_1986_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1865_1986_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1865_1986_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1865_1986_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1865_1986_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_1865_1986_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1865_1986_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">c=Col[c];</SPAN><SPAN style="COLOR: #008000"><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">D[c];i</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">c;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">D[i])&nbsp;<BR><IMG 
id=Codehighlighter1_1930_1983_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1930_1983_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_1930_1983_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_1930_1983_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_1930_1983_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_1930_1983_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_1930_1983_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_1930_1983_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_1930_1983_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_1930_1983_Open_Text><SPAN 
style="COLOR: #000000">{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;L[R[i]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">i;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;R[L[i]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">i;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">重复覆盖&nbsp;iter&nbsp;a*</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top></SPAN><SPAN 
style="COLOR: #0000ff">bool</SPAN><SPAN 
style="COLOR: #000000">&nbsp;hash[MAXC];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top></SPAN><SPAN style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;price()<BR><IMG 
id=Codehighlighter1_2034_2703_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2034_2703_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2034_2703_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2034_2703_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2034_2703_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2034_2703_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2034_2703_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2034_2703_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_2034_2703_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2034_2703_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;i,j,k;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ret</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #800080">0</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;memset(hash,</SPAN><SPAN 
style="COLOR: #800080">0</SPAN><SPAN style="COLOR: #000000">,</SPAN><SPAN 
style="COLOR: #0000ff">sizeof</SPAN><SPAN 
style="COLOR: #000000">(hash));<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">R[head];i</SPAN><SPAN 
style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">head;i</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">R[i])<BR><IMG 
id=Codehighlighter1_2140_2685_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2140_2685_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2140_2685_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2140_2685_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2140_2685_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2140_2685_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2140_2685_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2140_2685_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2140_2685_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2140_2685_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">(nCol[D[i]]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">continue</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(</SPAN><SPAN 
style="COLOR: #000000">!</SPAN><SPAN 
style="COLOR: #000000">hash[nCol[D[i]]])<BR><IMG 
id=Codehighlighter1_2217_2679_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2217_2679_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2217_2679_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2217_2679_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2217_2679_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2217_2679_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2217_2679_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2217_2679_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2217_2679_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2217_2679_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #000000">++</SPAN><SPAN style="COLOR: #000000">ret;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash[nCol[D[i]]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">D[i];j</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">i;j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">D[j])<BR><IMG id=Codehighlighter1_2322_2669_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2322_2669_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2322_2669_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2322_2669_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2322_2669_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2322_2669_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2322_2669_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2322_2669_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2322_2669_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2322_2669_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(nCol[j]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_2373_2422_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2373_2422_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2373_2422_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2373_2422_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2373_2422_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2373_2422_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2373_2422_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2373_2422_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2373_2422_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2373_2422_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">continue</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(k</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">R[j];k</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">j;k</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">R[k])<BR><IMG id=Codehighlighter1_2481_2655_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2481_2655_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2481_2655_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2481_2655_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2481_2655_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2481_2655_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2481_2655_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2481_2655_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2481_2655_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2481_2655_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(nCol[k]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_2540_2597_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2540_2597_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2540_2597_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2540_2597_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2540_2597_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2540_2597_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2540_2597_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2540_2597_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2540_2597_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2540_2597_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">continue</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;hash[nCol[k]]</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #0000ff">true</SPAN><SPAN 
style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;ret;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN><SPAN style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/None.gif" 
align=top>inline&nbsp;</SPAN><SPAN style="COLOR: #0000ff">bool</SPAN><SPAN 
style="COLOR: #000000">&nbsp;dfs(</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;k)<BR><IMG 
id=Codehighlighter1_2728_3624_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2728_3624_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2728_3624_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2728_3624_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2728_3624_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2728_3624_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2728_3624_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2728_3624_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedBlock.gif" 
align=top></SPAN><SPAN id=Codehighlighter1_2728_3624_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2728_3624_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(k</SPAN><SPAN style="COLOR: #000000">+</SPAN><SPAN 
style="COLOR: #000000">price()</SPAN><SPAN 
style="COLOR: #000000">&gt;</SPAN><SPAN style="COLOR: #000000">MAXSTEP)<BR><IMG 
id=Codehighlighter1_2761_2790_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2761_2790_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2761_2790_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2761_2790_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2761_2790_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2761_2790_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2761_2790_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2761_2790_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2761_2790_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2761_2790_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(R[head]</SPAN><SPAN 
style="COLOR: #000000">==</SPAN><SPAN style="COLOR: #000000">head)<BR><IMG 
id=Codehighlighter1_2819_2865_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2819_2865_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2819_2865_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2819_2865_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2819_2865_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2819_2865_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2819_2865_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2819_2865_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2819_2865_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2819_2865_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN style="COLOR: #008000">alen=k;</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;i,j;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN 
style="COLOR: #000000">&nbsp;s</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">INT_MAX;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">int</SPAN><SPAN style="COLOR: #000000">&nbsp;c;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">L[head];i</SPAN><SPAN 
style="COLOR: #000000">!=</SPAN><SPAN style="COLOR: #000000">head;i</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">L[i])<BR><IMG 
id=Codehighlighter1_2951_3085_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2951_3085_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_2951_3085_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_2951_3085_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_2951_3085_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_2951_3085_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_2951_3085_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_2951_3085_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_2951_3085_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_2951_3085_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">(nCol[D[i]]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)&nbsp;{c=i</SPAN><SPAN 
style="COLOR: #000000">;continue;}<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(CS[nCol[D[i]]]</SPAN><SPAN 
style="COLOR: #000000">&lt;</SPAN><SPAN style="COLOR: #000000">s)<BR><IMG 
id=Codehighlighter1_3021_3079_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3021_3079_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3021_3079_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3021_3079_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3021_3079_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3021_3079_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3021_3079_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3021_3079_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3021_3079_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3021_3079_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;s</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">CS[nCol[D[i]]];<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c</SPAN><SPAN 
style="COLOR: #000000">=</SPAN><SPAN style="COLOR: #000000">i;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">D[c];i</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">c;i</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">D[i])<BR><IMG id=Codehighlighter1_3120_3603_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3120_3603_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3120_3603_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3120_3603_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3120_3603_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3120_3603_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3120_3603_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3120_3603_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3120_3603_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3120_3603_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #008000">//</SPAN><SPAN 
style="COLOR: #008000">ans[k]=nRow[i];</SPAN><SPAN 
style="COLOR: #008000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top></SPAN><SPAN 
style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemoveCol(i);<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">R[i];j</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">i;j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">R[j])<BR><IMG id=Codehighlighter1_3212_3332_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3212_3332_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3212_3332_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3212_3332_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3212_3332_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3212_3332_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3212_3332_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3212_3332_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3212_3332_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3212_3332_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(nCol[j]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_3255_3296_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3255_3296_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3255_3296_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3255_3296_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3255_3296_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3255_3296_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3255_3296_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3255_3296_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3255_3296_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3255_3296_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">continue</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;RemoveCol(j);<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN style="COLOR: #000000">(dfs(k</SPAN><SPAN 
style="COLOR: #000000">+</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">))<BR><IMG id=Codehighlighter1_3371_3407_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3371_3407_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3371_3407_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3371_3407_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3371_3407_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3371_3407_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3371_3407_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3371_3407_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3371_3407_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3371_3407_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">true</SPAN><SPAN style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">for</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">L[i];j</SPAN><SPAN style="COLOR: #000000">!=</SPAN><SPAN 
style="COLOR: #000000">i;j</SPAN><SPAN style="COLOR: #000000">=</SPAN><SPAN 
style="COLOR: #000000">L[j])<BR><IMG id=Codehighlighter1_3450_3570_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3450_3570_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3450_3570_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3450_3570_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3450_3570_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3450_3570_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3450_3570_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3450_3570_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3450_3570_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3450_3570_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">if</SPAN><SPAN 
style="COLOR: #000000">&nbsp;(nCol[j]</SPAN><SPAN 
style="COLOR: #000000">==-</SPAN><SPAN style="COLOR: #800080">1</SPAN><SPAN 
style="COLOR: #000000">)<BR><IMG id=Codehighlighter1_3493_3534_Open_Image 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3493_3534_Open_Text').style.display='none'; document.getElementById('Codehighlighter1_3493_3534_Closed_Image').style.display='inline'; document.getElementById('Codehighlighter1_3493_3534_Closed_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockStart.gif" 
align=top><IMG id=Codehighlighter1_3493_3534_Closed_Image style="DISPLAY: none" 
onclick="this.style.display='none'; document.getElementById('Codehighlighter1_3493_3534_Closed_Text').style.display='none'; document.getElementById('Codehighlighter1_3493_3534_Open_Image').style.display='inline'; document.getElementById('Codehighlighter1_3493_3534_Open_Text').style.display='inline';" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ContractedSubBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
id=Codehighlighter1_3493_3534_Closed_Text 
style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/dot.gif"></SPAN><SPAN 
id=Codehighlighter1_3493_3534_Open_Text><SPAN style="COLOR: #000000">{<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">continue</SPAN><SPAN style="COLOR: #000000">;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ResumeCol(j);<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ResumeCol(i);&nbsp;&nbsp;&nbsp;&nbsp;<BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedSubBlockEnd.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;}</SPAN></SPAN><SPAN 
style="COLOR: #000000"><BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" align=top><BR><IMG 
alt="" src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/InBlock.gif" 
align=top>&nbsp;&nbsp;&nbsp;&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">return</SPAN><SPAN 
style="COLOR: #000000">&nbsp;</SPAN><SPAN 
style="COLOR: #0000ff">false</SPAN><SPAN style="COLOR: #000000">;<BR><IMG alt="" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ExpandedBlockEnd.gif" 
align=top>}</SPAN></SPAN></DIV></DIV>
<DIV id=digg_block>
<DIV id=div_digg>
<DIV class=diggit onclick=DiggIt(1537844,40859,1)><SPAN class=diggnum 
id=digg_count_1537844>0</SPAN> </DIV>
<DIV class=buryit onclick=DiggIt(1537844,40859,2)><SPAN class=burynum 
id=bury_count_1537844>0</SPAN> </DIV>
<DIV class=clear></DIV><SPAN id=span_isdigged_1537844 
style="DISPLAY: none">0</SPAN> 
<DIV class=diggword id=digg_word_1537844>(请您对文章做出评价)</DIV></DIV></DIV>
<DIV class=clear></DIV>
<DIV id=post_next_prev><A 
href="http://www.cnblogs.com/zhuangli/archive/2009/07/31/1535874.html">« 
</A>上一篇：<A title="发布于2009-07-31 12:45" 
href="http://www.cnblogs.com/zhuangli/archive/2009/07/31/1535874.html">DLX之数独问题的解决</A><BR><A 
href="http://www.cnblogs.com/zhuangli/archive/2009/10/31/1593645.html">» 
</A>下一篇：<A title="发布于2009-10-31 19:51" 
href="http://www.cnblogs.com/zhuangli/archive/2009/10/31/1593645.html">HDU10月月赛总结</A><BR></DIV>
<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/google_service.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
    try {
        GS_googleAddAdSenseService("ca-pub-4210569241504288");
        GS_googleEnableAllServices();
    }
    catch (e) { }
</SCRIPT>

<SCRIPT type=text/javascript>
    try {
        GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_body");
        GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_commentbox_up");
        GA_googleAddSlot("ca-pub-4210569241504288", "cnblogs_blogpost_bottom");
    }
    catch (e) { }
</SCRIPT>

<SCRIPT type=text/javascript>
    try {
        GA_googleFetchAds();
    } catch (e) { }
</SCRIPT>

<SCRIPT type=text/javascript>
    var blog_ad_has_shown = false;
</SCRIPT>
</DIV>
<DIV class=postDesc>posted @ 2009-08-03 19:18 <A 
href="http://www.cnblogs.com/zhuangli/">Hdu-Lost</A> 阅读(253) <A 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html#commentform">评论(0)</A> 
&nbsp;<A 
href="http://www.cnblogs.com/zhuangli/admin/EditPosts.aspx?postid=1537844">编辑</A> 
<A href="http://www.cnblogs.com/zhuangli/AddToFavorite.aspx?id=1537844">收藏</A> 
<A onclick="PutInWz();return false;" 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html#">网摘</A> 
所属分类: <A 
href="http://www.cnblogs.com/zhuangli/category/147049.html">ACM/ICPC</A></DIV></DIV><IMG 
height=1 src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/1537844.jpg" width=1> <!--
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
<rdf:Description
rdf:about="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html"
dc:identifier="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html"
dc:title=""
trackback:ping="http://www.cnblogs.com/zhuangli/services/trackbacks/1537844.aspx" />
</rdf:RDF>
--></DIV><!--end: topics 文章、评论容器-->
<SCRIPT type=text/javascript>
    var commentAuthorHasChecked = false;
    var commentAuthorIsValid = false;
    var commentUrlIsValid = true;
    var commentEmailIsValid = true;
    var authenCodeHasChecked = false;
    var authenCodeIsValid = true;
    var hasLogined = false;
    
    function PostComment() {    
        
        var isValid = true;
        
        if($("#wrapAuthenCode").css("display")=="none"){
            ShowAuthenCode();
            $("#tip_AuthenCode").css("color","red");
            $("#tip_AuthenCode").html("请输入验证码！");
            isValid = false;
        }
        
        if(!hasLogined && !commentAuthorHasChecked){
            CheckAuthor();        
        }                
        if(!hasLogined && !commentAuthorIsValid){
            isValid = false;
        }
                       
        if(!authenCodeHasChecked){
            CheckAuthenCode();            
        }
        if(!authenCodeIsValid){
            isValid = false;
        }
        
        if(!hasLogined && !commentUrlIsValid){            
            isValid = false;
        }        
        if(!commentEmailIsValid){            
            isValid = false;
        }        
        if(!CheckCommentContent()){
            isValid = false;
        }    
        if(!isValid){
            return;
        }

        var content = $("#tbCommentBody").val();
        if(content.length>2000){
            alert("评论内容过长！不允许发布！");
            return;
        }        
        
       if ($("#span_comment_posted").html()!='' && $("#span_comment_posted").html()==content){
            alert("该评论已发表过!");
            return;
        }
        
        $("#tip_comment").html("评论提交中...");
        $("#span_comment_posted").html(content);
        //content = content.replace("'", "\\'");
        var email = $("#tbCommentEmail").val();
        var authenNum = $("#tbAuthenCode").val();
        var authenId = $("#span_comment_test").html();
        var comment = {};
        comment.authenNum = authenNum;
        comment.authenId= authenId;
        comment.parentId = 1537844;
        comment.blogId = 40859;
        comment.sourceUrl = 'http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html';
        comment.author = $("#tbCommentAuthor").val();
        comment.url = $("#tbCommentAuthorUrl").val();
        comment.authenCode = $("#tbAuthenCode").val();
        comment.email = email;
        comment.title = 'Dancing Links的重复覆盖问题解法';
        comment.content = content;
        comment.parentCommentId = $("#span_parentcomment_id").html();
        $.ajax({
            url: '/ws/CommentService.asmx/AddAnonymousComment',
            data: $.toJSON(comment),
            type: "post",
            dataType: "json",
            contentType: "application/json; charset=utf8",
            success: function(data) {
               if (data.d["IsSuccess"]) {
                    ShowCommentMsg("感谢您的回复:)");
                    //RereshComments2(comment.parentId);
                    $("#tbCommentBody").val('');
                    //$("#divCommentShow").html(data.d["ReturnData"]+content.replace(/\n/g,"<br/>")+"<br/><br/>");
                    $("#divCommentShow").html($("#divCommentShow").html()+data.d["ReturnData"]); 
                    $("#tip_AuthenCode").html('');
                    RefreshAuthenCode();
                    $("#tbAuthenCode").val("");                    
                    CommentNotify(data.d["CommentID"]);
                }
                else {
                    ShowCommentMsg(data.d["ReturnData"]);//"抱歉！评论提交失败！请与管理员联系。");
                    $("#span_comment_posted").html(''); 
                }
            },
            error: function(xhr) {
                ShowCommentMsg("抱歉！评论提交失败！请与管理员联系。");
                $("#span_comment_posted").html('');  
                //alert(xhr.responseText);
            }
        }
        );
    }
    
    function RefreshAuthenCode(){
        AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",RefreshImg); 
        $("#lnkRereshAuthenCode").html("<span style='color:red'>刷新中...</span>");
        return false;
    }
    
    function RefreshImg(response){
       $("#imgAuthenCode").attr("src","/Modules/CaptchaImage/ValidCodeImage.aspx?id="+encodeURIComponent(response));
       $("#span_comment_test").html(response);
       $("#lnkRereshAuthenCode").html("看不清，换一个");
    }
    
    function ShowAuthenCode(){
        //if($("#wrapAuthenCode").css("display")=="none"){    
        //    AjaxPost("/ws/CommentService.asmx/RefreshAuthenCode","{}",ShowAuthenCodeOk);
        //}
        $("#wrapAuthenCode").show();      
    }
    
    function ShowAuthenCodeOk(response){
         UpdateAuthenCode();
         $("#tbAuthenCode").val("");
         $("#wrapAuthenCode").show();
         $("#tip_AuthenCode").html('');
    }  
 
    
    function CheckAuthor(isOnblur){
        commentAuthorHasChecked = true;
        var maxLength = 30;
        if($("#tbCommentAuthor").val().length == 0){
            $("#tip_author").html("请输入您的昵称！");
            commentAuthorIsValid = false;
            return false;
        }     
        else if($("#tbCommentAuthor").val().length > maxLength){
            $("#tip_author").html("昵称不允许超过" + maxLength + "个字符！");
            commentAuthorIsValid = false;
            return false;
        }
        else{
            //if(isOnblur){
                AjaxPost("/ws/CommentService.asmx/IsAuthorExist","{author:'"+$("#tbCommentAuthor").val()+"'}" ,OnCheckAuthorExist);
            //}
            //else{
            //    $("#tip_author").html("");
            //    commentAuthorIsValid = true;
            //}
            return true;
        }
   }
   
    function OnCheckAuthorExist(response){        
        if(!response){
            $("#tip_author").html("");
            commentAuthorIsValid = true;
        }
        else{
            $("#tip_author").html("该昵称已被使用，请更换昵称");
            commentAuthorIsValid = false;
        }
   }
   
    function CheckUrl(){
        var maxLength = 50;
        var url = $("#tbCommentAuthorUrl").val();
        
        if(url.length == 0){
            commentUrlIsValid = true;
            return true;
        }
        else if(url.length > maxLength){
            $("#tip_url").html("主页地址不允许超过" + maxLength + "个字符！");
            commentUrlIsValid = false;
            return false;
        }
        else if(url.indexOf("http://")!=0 || url.indexOf(".") < 0){
            $("#tip_url").html("主页地址要以“http://”开头");
            commentUrlIsValid = false;
            return false;
        }
        else{
            $("#tip_url").html("");
            commentUrlIsValid = true;
            return true;
        }
   }
   
   function CheckEmail(){
        var email = $("#tbCommentEmail").val();
        if(email.length>0){
            var regExp = new RegExp("\\w+@((\\w|\-)+\\.)+[a-z]{2,3}");
            if(!regExp.test(email)){
                $("#tip_email").html("请输入正确的邮件地址!");
                commentEmailIsValid = false;
            }
            else{
                commentEmailIsValid = true;
                 $("#tip_email").html("");
            }
        }
        else{
            commentEmailIsValid = true;
            $("#tip_email").html("");  
        }
   }
   
   function CheckAuthenCode(){
        authenCodeHasChecked = true;
        var num = $("#tbAuthenCode").val();
        var id = $("#span_comment_test").html();
        $("#tip_AuthenCode").css("color","red");
        if(num.length==0){
             authenCodeIsValid = false;
             $("#tip_AuthenCode").html("请输入验证码！");
             return;
        }
        else if(num.length!=4){
            authenCodeIsValid = false;
            $("#tip_AuthenCode").html("请输入四位数字！");
             return;
        }
        else if(new RegExp("(\d+)").test(num)){
            authenCodeIsValid = false;
            $("#tip_AuthenCode").html("请输入四位数字！");
             return;
        }
        else{
            AjaxPost("/ws/CommentService.asmx/CheckAuthenCode","{number:"+num+",id:'"+id+"'}", OnCheckAuthenCode);
        }
   }
   
   function OnCheckAuthenCode(response){
        if(response){
            $("#tip_AuthenCode").css("color","green");
            $("#tip_AuthenCode").html("验证码输入正确！");
            authenCodeIsValid = true;            
        }
        else{
            $("#tip_AuthenCode").css("color","red");
            $("#tip_AuthenCode").html("验证码输错啦！");
            RefreshAuthenCode();
            authenCodeIsValid = false;           
        }
   }
   
   function CheckCommentContent(){
    if($("#tbCommentBody").val().length==0){
        alert("请输入评论内容！");
        return false;
    }
    return true;
   }
    
</SCRIPT>

<DIV class=commentform id=ctl05_comment_form>
<DIV id=ctl05_divCommentPannel>
<DIV id=divCommentShow></DIV>
<DIV id=comment_nav style="TEXT-ALIGN: right"><SPAN 
id=span_refresh_tips></SPAN><A id=lnk_RefreshComments 
onclick="return RefreshCommentList(1537844);" 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html###" 
name=commentform>刷新评论列表</A>&nbsp; <A onclick="return RefreshPage();" 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html###">刷新页面</A>&nbsp; 
<A 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html#top">返回页首</A></DIV>
<DIV id=commentform_title>发表评论 <SPAN class=ad_commentbox_up><A 
href="http://job.cnblogs.com/zt/200912YesHJ/" 
target=_blank>沪江网技术部招聘程序员</A></SPAN></DIV><SPAN id=tip_comment 
style="COLOR: red"></SPAN>
<P>昵称：<INPUT class=author id=tbCommentAuthor onblur=CheckAuthor() 
onfocus=ShowAuthenCode()> <SPAN id=tip_author style="COLOR: red"></SPAN><A 
href="http://passport.cnblogs.com/login.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fzhuangli%2farchive%2f2009%2f08%2f03%2f1537844.html%3flogin%3d1%23commentform">[登录]</A> 
<A 
href="http://passport.cnblogs.com/register.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fzhuangli%2farchive%2f2009%2f08%2f03%2f1537844.html%23Top">[注册]</A> 
</P>
<P>主页：<INPUT class=url id=tbCommentAuthorUrl onblur=CheckUrl() 
onfocus=ShowAuthenCode()> <SPAN id=tip_url style="COLOR: red"></SPAN></P>
<P>邮箱：<INPUT class=email id=tbCommentEmail onblur=CheckEmail() 
onfocus=ShowAuthenCode()>(仅博主可见) <SPAN id=tip_email 
style="COLOR: red"></SPAN></P>
<P id=wrapAuthenCode style="DISPLAY: none">验证码：<INPUT id=tbAuthenCode 
onblur=CheckAuthenCode()> <SPAN id=tip_AuthenCode></SPAN><IMG id=imgAuthenCode 
alt=验证码 src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ValidCodeImage.jpg" 
align=absMiddle> <A id=lnkRereshAuthenCode onclick="return RefreshAuthenCode();" 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html###">看不清，换一个</A> 
</P>
<P>评论内容：<SPAN id=tip_comment_content style="COLOR: red"></SPAN> <BR><TEXTAREA class=comment_textarea id=tbCommentBody onkeydown="return clt_enter(event)" onfocus=ShowAuthenCode()></TEXTAREA> 
<!--
<br /><input id="cbRememberMe" type="checkbox" />记住我的昵称和主页
--></P>
<P><INPUT class=comment_btn id=btn_comment_submit onclick="PostComment();return false;" type=button value=提交> 
&nbsp;&nbsp;<A 
href="http://passport.cnblogs.com/login.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fzhuangli%2farchive%2f2009%2f08%2f03%2f1537844.html%3flogin%3d1%23commentform">登录</A>&nbsp;&nbsp;<A 
href="http://passport.cnblogs.com/register.aspx?ReturnUrl=http%3a%2f%2fwww.cnblogs.com%2fzhuangli%2farchive%2f2009%2f08%2f03%2f1537844.html%23Bottom">注册</A> 
</P>
<P>[使用Ctrl+Enter键快速提交评论] </P>
<DIV style="DISPLAY: none"><SPAN id=comment_edit_id></SPAN><SPAN 
id=span_parentcomment_id>0</SPAN> <SPAN id=span_parent_id>1537844</SPAN> <SPAN 
id=span_comment_replyto></SPAN><SPAN id=span_comment_posted></SPAN><SPAN 
id=span_comment_test>+g7RvY+MPUw=</SPAN> </DIV></DIV>网站导航：<A 
href="http://www.cnblogs.com/" target=_blank>博客园首页</A> | <A 
href="http://home.cnblogs.com/" target=_blank>个人主页</A> | <A 
href="http://home.cnblogs.com/ing/" target=_blank>闪存</A> | <A 
href="http://news.cnblogs.com/" target=_blank>IT新闻</A> | <A 
href="http://job.cnblogs.com/" target=_blank>程序员招聘</A> | <A 
href="http://space.cnblogs.com/" target=_blank>社区</A> | <A 
href="http://space.cnblogs.com/q/" target=_blank>博问</A> | <A 
href="http://wz.cnblogs.com/" target=_blank>网摘</A><BR><BR>
<SCRIPT type=text/javascript>
    try {
        GA_googleFillSlot("cnblogs_blogpost_bottom");
    }
    catch (e) { }
</SCRIPT>
<BR>
<DIV class=itnews id=itnews>IT新闻:<BR>· <A 
href="http://news.cnblogs.com/n/53360/" target=_blank>甲骨文期待太阳升起</A><BR>· <A 
href="http://news.cnblogs.com/n/53359/" 
target=_blank>Firefox获“2009年度漏洞王”称号</A><BR>· <A 
href="http://news.cnblogs.com/n/53358/" target=_blank>App 
Store未来发展呈现四大趋势</A><BR>· <A href="http://news.cnblogs.com/n/53357/" 
target=_blank>IDC：明年IT支出达1.5万亿 云等应用将剧增</A><BR>· <A 
href="http://news.cnblogs.com/n/53356/" target=_blank>在被 Google 收购两周后，Etherpad 
开源</A><BR></DIV>
<DIV id=div_ad2><A href="http://www.china-pub.com/itbook/" 
target=_blank>China-pub 计算机图书网上专卖店！6.5万品种2-8折！</A><BR><A 
href="http://www.china-pub.com/static07/0901/zh_jueba_090121.asp" 
target=_blank>China-Pub 计算机绝版图书按需印刷服务</A><BR></DIV><BR>
<DIV id=HistoryToday><B>历史上的今天:</B><BR>2008-08-03 <A 
href="http://www.cnblogs.com/zhuangli/archive/2008/08/03/1259248.html">KM算法(转)</A><BR>2008-08-03 
<A 
href="http://www.cnblogs.com/zhuangli/archive/2008/08/03/1259153.html">最大流(邻接表实现)</A><BR></DIV>
<DIV id=div_commentbox_nav>链接：<A 
href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html?switchskin=1#skinlist">切换模板</A><BR></DIV>
<DIV id=relative_search><BR><B>相关搜索:</B><BR><A 
href="http://zzk.cnblogs.com/s?w=ACM%2fICPC" target=_blank>ACM/ICPC</A> </DIV>
<DIV id=relative_search><BR><B>在知识库中查看：</B><BR><A 
href="http://kb.cnblogs.com/a/1537844/">Dancing 
Links的重复覆盖问题解法</A></DIV><BR></DIV></DIV><!--end: forFlow --></DIV><!--end: mainContent 主体内容容器-->
<DIV id=sideBar>
<DIV id=sideBarMain><!--done-->
<DIV class=newsItem>
<H3 class=catListTitle>公告</H3>
<DIV id=profile_block><A href="http://home.cnblogs.com/zhuangli/" 
target=_blank>我的主页</A>&nbsp; <A href="http://home.cnblogs.com/zhuangli/detail/" 
target=_blank>个人资料</A><BR><A href="http://home.cnblogs.com/zhuangli/ing/" 
target=_blank>我的闪存</A>&nbsp; <A 
href="http://space.cnblogs.com/msg/send/Hdu-Lost" 
target=_blank>发短消息</A></DIV></DIV>
<DIV id=calendar>
<TABLE class=Cal id=Calendar1_entryCal title=Calendar cellSpacing=0 
cellPadding=0 border=0>
  <TBODY>
  <TR>
    <TD colSpan=7>
      <TABLE class=CalTitle cellSpacing=0 border=0>
        <TBODY>
        <TR>
          <TD class=CalNextPrev><A title="Go to the previous month" 
            style="COLOR: black" 
            href="javascript:__doPostBack('Calendar1$entryCal','V3469')">&lt;</A></TD>
          <TD align=middle>2009年8月</TD>
          <TD class=CalNextPrev align=right><A title="Go to the next month" 
            style="COLOR: black" 
            href="javascript:__doPostBack('Calendar1$entryCal','V3531')">&gt;</A></TD></TR></TBODY></TABLE></TD></TR>
  <TR>
    <TH class=CalDayHeader scope=col align=middle abbr=日>日</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=一>一</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=二>二</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=三>三</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=四>四</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=五>五</TH>
    <TH class=CalDayHeader scope=col align=middle abbr=六>六</TH></TR>
  <TR>
    <TD class=CalOtherMonthDay align=middle>26</TD>
    <TD class=CalOtherMonthDay align=middle>27</TD>
    <TD class=CalOtherMonthDay align=middle>28</TD>
    <TD class=CalOtherMonthDay align=middle>29</TD>
    <TD class=CalOtherMonthDay align=middle>30</TD>
    <TD class=CalOtherMonthDay align=middle>31</TD>
    <TD class=CalWeekendDay align=middle>1</TD></TR>
  <TR>
    <TD class=CalWeekendDay align=middle>2</TD>
    <TD align=middle><A 
      href="http://www.cnblogs.com/zhuangli/archive/2009/8/3.html"><U>3</U></A></TD>
    <TD align=middle>4</TD>
    <TD align=middle>5</TD>
    <TD align=middle>6</TD>
    <TD align=middle>7</TD>
    <TD class=CalWeekendDay align=middle>8</TD></TR>
  <TR>
    <TD class=CalWeekendDay align=middle>9</TD>
    <TD align=middle>10</TD>
    <TD align=middle>11</TD>
    <TD align=middle>12</TD>
    <TD align=middle>13</TD>
    <TD align=middle>14</TD>
    <TD class=CalWeekendDay align=middle>15</TD></TR>
  <TR>
    <TD class=CalWeekendDay align=middle>16</TD>
    <TD align=middle>17</TD>
    <TD align=middle>18</TD>
    <TD align=middle>19</TD>
    <TD align=middle>20</TD>
    <TD align=middle>21</TD>
    <TD class=CalWeekendDay align=middle>22</TD></TR>
  <TR>
    <TD class=CalWeekendDay align=middle>23</TD>
    <TD align=middle>24</TD>
    <TD align=middle>25</TD>
    <TD align=middle>26</TD>
    <TD align=middle>27</TD>
    <TD align=middle>28</TD>
    <TD class=CalWeekendDay align=middle>29</TD></TR>
  <TR>
    <TD class=CalWeekendDay align=middle>30</TD>
    <TD align=middle>31</TD>
    <TD class=CalOtherMonthDay align=middle>1</TD>
    <TD class=CalOtherMonthDay align=middle>2</TD>
    <TD class=CalOtherMonthDay align=middle>3</TD>
    <TD class=CalOtherMonthDay align=middle>4</TD>
    <TD class=CalOtherMonthDay align=middle>5</TD></TR></TBODY></TABLE></DIV>
<DIV id=leftcontentcontainer>
<SCRIPT type=text/javascript>
var blogapp = 'zhuangli';
</SCRIPT>

<DIV class=mySearch>
<H3 class=catListTitle>搜索</H3>
<DIV class=div_my_zzk><INPUT class=input_my_zzk id=q 
onkeydown="return zzk_go_enter(event);">&nbsp;<INPUT class=btn_my_zzk id=btnZzk onclick=zzk_go() type=button value=找找看></DIV>
<DIV class=div_my_zzk><INPUT class=input_my_zzk id=google_q 
onkeydown="return google_go_enter(event)" name=google_q>&nbsp;<INPUT class=btn_my_zzk onclick=google_go() type=button value=Google搜索></DIV></DIV>
<DIV class=catListLink>
<H3 class=catListTitle>常用链接</H3>
<UL>
  <LI><A id=SingleColumn1_ctl02_rptMainLinks_ctl00_lnkLinkItem 
  href="http://www.cnblogs.com/zhuangli/MyPosts.html">我的随笔</A> 
  <LI><A id=SingleColumn1_ctl02_rptMainLinks_ctl01_lnkLinkItem 
  href="http://home.cnblogs.com/zhuangli/">我的空间</A> 
  <LI><A id=SingleColumn1_ctl02_rptMainLinks_ctl02_lnkLinkItem 
  href="http://space.cnblogs.com/msg/recent">我的短信</A> 
  <LI><A id=SingleColumn1_ctl02_rptMainLinks_ctl03_lnkLinkItem 
  href="http://www.cnblogs.com/zhuangli/MyComments.html">我的评论</A> 
  <LI><A id=itemListLink 
  onclick="this.blur();WarpClass('itemListLink', 'itemListLin_con');return false;" 
  href="http://www.cnblogs.com/zhuangli/archive/2009/08/03/1537844.html#">更多链接</A> 
  </LI></UL>
<DIV id=itemListLin_con style="DISPLAY: none">
<UL>
  <LI><A id=SingleColumn1_ctl02_repeaterLinks_ctl00_lnkLinkItem title=我发表过评论的随笔 
  href="http://www.cnblogs.com/zhuangli/OtherPosts.html">我的参与</A> 
  <LI><A id=SingleColumn1_ctl02_repeaterLinks_ctl01_lnkLinkItem 
  href="http://www.cnblogs.com/zhuangli/MyNews.html">我的新闻</A> 
  <LI><A id=SingleColumn1_ctl02_repeaterLinks_ctl02_lnkLinkItem 
  href="http://www.cnblogs.com/zhuangli/RecentComments.html">最新评论</A> 
  <LI><A id=SingleColumn1_ctl02_repeaterLinks_ctl03_lnkLinkItem 
  href="http://www.cnblogs.com/zhuangli/tag/">我的标签</A> </LI></UL></DIV></DIV>
<DIV class=catListPostCategory>
<H3 class=catListTitle>随笔分类<SPAN 
style="FONT-WEIGHT: normal; FONT-SIZE: 11px">(61)</SPAN></H3>
<UL>
  <LI><A id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_Link 
  href="http://www.cnblogs.com/zhuangli/category/147049.html">ACM/ICPC(61)</A> 
  <A id=SingleColumn1_Categories_CatList_ctl00_LinkList_ctl01_RssLink 
  title="Subscribe to ACM/ICPC(61)" 
  href="http://www.cnblogs.com/zhuangli/category/147049.html/rss">(rss)</A> 
</LI></UL></DIV>
<DIV class=catListPostArchive>
<H3 class=catListTitle>随笔档案<SPAN 
style="FONT-WEIGHT: normal; FONT-SIZE: 11px">(65)</SPAN></H3>
<UL>
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl01_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2009/11.html">2009年11月 (1)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl02_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2009/10.html">2009年10月 (1)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl03_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2009/08.html">2009年8月 (1)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl04_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2009/07.html">2009年7月 (2)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl05_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2009/03.html">2009年3月 (1)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl06_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2008/11.html">2008年11月 (1)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl07_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2008/10.html">2008年10月 (2)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl08_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2008/09.html">2008年9月 (16)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl09_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08.html">2008年8月 (27)</A> 
  <LI><A id=SingleColumn1_Categories_CatList_ctl01_LinkList_ctl10_Link 
  href="http://www.cnblogs.com/zhuangli/archive/2008/07.html">2008年7月 (13)</A> 
  </LI></UL></DIV>
<DIV class=catList中文爱百科：http://www.ipedia.org.cn/>
<H3 class=catListTitle>友情链接</H3>
<UL></UL></DIV>
<DIV class=catListComment>
<H3 class=catListTitle>最新评论<A id=SingleColumn1__1a85ff9_RSSHyperlink1 
title=RSS订阅最最新评论 href="http://www.cnblogs.com/zhuangli/CommentsRSS.aspx"><IMG 
title=RSS订阅最最新评论 
style="BORDER-TOP-WIDTH: 0px; BORDER-LEFT-WIDTH: 0px; BORDER-BOTTOM-WIDTH: 0px; BORDER-RIGHT-WIDTH: 0px" 
src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/xml.gif"></A></H3>
<DIV class=divRecentCommentAticle><A class=listitem 
id=SingleColumn1__1a85ff9_CommentList_ctl00_Hyperlink2 
href="http://www.cnblogs.com/zhuangli/archive/2008/08/04/1259527.html#1725006">1.&nbsp;Re:传说中效率最高的最大流算法(Dinic)</A> 
</DIV>
<DIV class=divRecentComment>呵呵，希望楼主能对这个算法做一个比较详细的解释……不知道要求是不是有点过分…… (fall_zhagn) 
</DIV>
<DIV class=divRecentCommentAticle><A class=listitem 
id=SingleColumn1__1a85ff9_CommentList_ctl01_Hyperlink2 
href="http://www.cnblogs.com/zhuangli/archive/2008/08/04/1259527.html#1724997">2.&nbsp;Re:传说中效率最高的最大流算法(Dinic)</A> 
</DIV>
<DIV 
class=divRecentComment>弱弱的请教一下，请问经过insert初始化后的s和p中存的分别是什么？我是个新手，还没入门，还望大牛指点一二~ 
不胜感谢！可以邮箱交流。 (fall_zhagn) </DIV>
<DIV class=divRecentCommentAticle><A class=listitem 
id=SingleColumn1__1a85ff9_CommentList_ctl02_Hyperlink2 
href="http://www.cnblogs.com/zhuangli/archive/2009/03/11/1408569.html#1708079">3.&nbsp;Re:HDU 
2665</A> </DIV>
<DIV class=divRecentComment>@Geek.tan 这个是线段树+二分吧... 你用kth数那个肯定超 (zhuangli) 
</DIV>
<DIV class=divRecentCommentAticle><A class=listitem 
id=SingleColumn1__1a85ff9_CommentList_ctl03_Hyperlink2 
href="http://www.cnblogs.com/zhuangli/archive/2009/03/11/1408569.html#1703912">4.&nbsp;Re:HDU 
2665</A> </DIV>
<DIV class=divRecentComment>我用的分治算法 超时了，好无语的~~ (Geek.tan) </DIV>
<DIV class=divRecentCommentAticle><A class=listitem 
id=SingleColumn1__1a85ff9_CommentList_ctl04_Hyperlink2 
href="http://www.cnblogs.com/zhuangli/archive/2008/08/04/1259527.html#1687266">5.&nbsp;Re:传说中效率最高的最大流算法(Dinic)</A> 
</DIV>
<DIV class=divRecentComment>@janlim 从未写过这个--- (- - Lost) </DIV></DIV>
<DIV class=catListView>
<H3 class=catListTitle>阅读排行榜</H3>
<UL>
  <LI><A id=SingleColumn1_ctl06_TopList_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/04/1259527.html">1.&nbsp;传说中效率最高的最大流算法(Dinic)(2432)</A> 

  <LI><A id=SingleColumn1_ctl06_TopList_ctl02_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/01/1258417.html">2.&nbsp;最大流算法的邻接阵实现(1101)</A> 

  <LI><A id=SingleColumn1_ctl06_TopList_ctl03_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/01/1258434.html">3.&nbsp;来自威士忌的代码(最小费用最大流)(860)</A> 

  <LI><A id=SingleColumn1_ctl06_TopList_ctl04_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/03/1259248.html">4.&nbsp;KM算法(转)(685)</A> 

  <LI><A id=SingleColumn1_ctl06_TopList_ctl05_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/13/1267249.html">5.&nbsp;HDU 
  2222(AC 自动机)(645)</A> </LI></UL></DIV>
<DIV class=catListFeedback>
<H3 class=catListTitle>评论排行榜</H3>
<UL>
  <LI><A id=SingleColumn1_ctl07_TopList_ctl01_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/04/1259527.html">1.&nbsp;传说中效率最高的最大流算法(Dinic)(25)</A> 

  <LI><A id=SingleColumn1_ctl07_TopList_ctl02_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/13/1267249.html">2.&nbsp;HDU 
  2222(AC 自动机)(13)</A> 
  <LI><A id=SingleColumn1_ctl07_TopList_ctl03_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/11/21/1338078.html">3.&nbsp;退役了(10)</A> 

  <LI><A id=SingleColumn1_ctl07_TopList_ctl04_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/03/1259248.html">4.&nbsp;KM算法(转)(6)</A> 

  <LI><A id=SingleColumn1_ctl07_TopList_ctl05_Hyperlink1 
  href="http://www.cnblogs.com/zhuangli/archive/2008/08/01/1258434.html">5.&nbsp;来自威士忌的代码(最小费用最大流)(6)</A> 
  </LI></UL></DIV></DIV></DIV><!--end: sideBarMain --></DIV><!--end: sideBar 侧边栏容器 -->
<DIV class=clear></DIV></DIV><!--end: main -->
<DIV class=clear></DIV>
<DIV id=footer><!--done-->Copyright ©2009 Hdu-Lost 
</DIV><!--end: footer --></DIV><!--end: home 自定义的最大容器 --></FORM>
<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/shCore.js" 
type=text/javascript></SCRIPT>

<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/shLanguage.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
        try {
            SyntaxHighlighter.config.clipboardSwf = 'http://common.cnblogs.com/flash/clipboard.swf'
            SyntaxHighlighter.all();
        } catch (e) { }
    </SCRIPT>

<SCRIPT src="Dancing Links的重复覆盖问题解法 - Lost - 博客园.files/ShowHidden.js" 
type=text/javascript></SCRIPT>

<SCRIPT type=text/javascript>
        var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
        document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
    </SCRIPT>

<SCRIPT type=text/javascript>
        try {
            var pageTracker = _gat._getTracker("UA-476124-1");
            pageTracker._trackPageview();
        } catch (err) { }</SCRIPT>
</BODY></HTML>
